Lars Ingebrigtsen [Sat, 20 Feb 2021 14:37:24 +0000 (15:37 +0100)]
Mention `M-S-x' in the Emacs manual.
* doc/emacs/m-x.texi (M-x): Mention `M-S-x' in the Emacs manual.
Eli Zaretskii [Sat, 20 Feb 2021 14:24:03 +0000 (16:24 +0200)]
; Fix typos in last change
* etc/NEWS: Improve wording.
* lisp/simple.el (execute-extended-command-for-buffer): Fix typo.
Lars Ingebrigtsen [Sat, 20 Feb 2021 14:12:45 +0000 (15:12 +0100)]
Add a new command for mode-specific commands
* doc/lispref/commands.texi (Interactive Call): Document it.
* lisp/simple.el (command-completion-using-modes-p): Refactored
out into its own function for reuse...
(command-completion-default-include-p): ... from here.
(execute-extended-command-for-buffer): New command and keystroke
(`M-S-x').
Lars Ingebrigtsen [Sat, 20 Feb 2021 13:29:41 +0000 (14:29 +0100)]
Change how (declare (modes store the data
* lisp/emacs-lisp/byte-run.el (byte-run--set-modes): Change from
being a predicate to storing the modes. This allows using the
modes for positive command discovery, too.
* src/data.c (Fcommand_modes): Look at the `command-modes' symbol
property, too.
Lars Ingebrigtsen [Sat, 20 Feb 2021 12:44:19 +0000 (13:44 +0100)]
Add the `always' function
* doc/lispref/functions.texi (Calling Functions): Document it.
* lisp/subr.el (always): New function.
* lisp/emacs-lisp/byte-opt.el (side-effect-free-fns): Mark it as
side effect free.
F. Jason Park [Sat, 6 Feb 2021 03:41:04 +0000 (19:41 -0800)]
Use raw bytes for SOCKS 4 IP addresses
* lisp/net/socks.el: (socks--open-network-stream, socks-send-command):
* test/lisp/net/socks-tests.el: (socks-tests-v4-basic): (Bug#46342).
F. Jason Park [Fri, 5 Feb 2021 13:24:55 +0000 (05:24 -0800)]
Add more auth-related tests for socks.el
* test/lisp/net/socks-tests.el (auth-registration-and-suite-offer)
(filter-response-parsing-v4, filter-response-parsing-v5): Assert
auth-method selection wrangling and socks-filter parsing.
(v5-auth-user-pass, v5-auth-user-pass-blank, v5-auth-none): Show prep
and execution of the SOCKS connect command and proxying of an HTTP
request; simplify fake server. (Bug#46342)
Stefan Kangas [Sat, 20 Feb 2021 06:34:52 +0000 (07:34 +0100)]
Convert re-builder menu to easy-menu-define
* lisp/emacs-lisp/re-builder.el (reb-mode-map): Move menu
definition from here...
(reb-mode-menu): ...to here, and rewrite using easy-menu-define.
Stefan Kangas [Sat, 20 Feb 2021 05:59:02 +0000 (06:59 +0100)]
Convert finder menu to easy-menu-define
* lisp/finder.el (finder-mode-map): Move menu definition from
here...
(finder-mode-menu): ...to here, and rewrite using
easy-menu-define.
Stefan Kangas [Sat, 20 Feb 2021 04:55:33 +0000 (05:55 +0100)]
Add toolbar for help-mode
* lisp/help-mode.el (help-mode): Add toolbar.
(help-mode-tool-bar-map): New variable.
(help-mode-menu): Disable forward/backward items when stack is empty.
(help-bookmark-make-record, help-bookmark-jump): Minor doc fixes.
Stefan Kangas [Sat, 20 Feb 2021 03:21:35 +0000 (04:21 +0100)]
* lisp/woman.el: Doc fix; remove redundant setup info.
Thomas Fitzsimmons [Fri, 19 Feb 2021 22:32:59 +0000 (17:32 -0500)]
* lisp/url/url-http.el (url-http): Fix docstring typo.
Thomas Fitzsimmons [Fri, 19 Feb 2021 22:11:16 +0000 (17:11 -0500)]
ntlm-tests: Remove missing dependency warnings
* test/lisp/net/ntlm-tests.el: Remove warnings about dependencies
not being present.
Thomas Fitzsimmons [Fri, 19 Feb 2021 22:07:52 +0000 (17:07 -0500)]
ntlm-tests: Skip tests if dependencies are too old
* test/lisp/net/ntlm-tests.el (ntlm-tests--dependencies-present):
Add version and functionality checks.
Co-authored-by: Michael Albinus <michael.albinus@gmx.de>
Alan Third [Fri, 19 Feb 2021 19:25:39 +0000 (19:25 +0000)]
Fix frame contents scaling bug on macOS (bug#46155)
Discussion in bug#46406.
* src/nsterm.m ([EmacsView focusOnDrawingBuffer:]): Set the scale
factor for the backing layer.
Stefan Monnier [Fri, 19 Feb 2021 17:51:36 +0000 (12:51 -0500)]
* lisp/emacs-lisp/bytecomp.el: Don't warn for repeated _ args
(byte-compile-check-lambda-list): Skip warnings of repeated arg for
those that are declared as unused anyway.
Stefan Monnier [Fri, 19 Feb 2021 17:08:00 +0000 (12:08 -0500)]
* test/lisp/emacs-lisp/edebug-tests.el: Adjust to new `edebug-eval-defun`.
(edebug-tests-trivial-backquote): Adjust to the way `eval-defun`
outputs its result.
(edebug-tests-cl-macrolet): Adjust to the fact that now macro expansion
takes place during the `eval-defun` even when Edebugging.
Glenn Morris [Fri, 19 Feb 2021 16:36:56 +0000 (08:36 -0800)]
Merge from origin/emacs-27
8e8b46ef81 (origin/emacs-27) More accurate documentation of the "r" i...
dcb2015a5b Mention the GNU Kind Communications Guidelines in the FAQ
9882e63eea ; * CONTRIBUTE: Another wording change regarding tiny chan...
850f18ef23 Allow newlines in password prompts again in comint
c977370dd7 Avoid point movement when visiting image files
da64a257a4 ; * CONTRIBUTE: Yet another clarification of significant c...
d03f2a6ee9 Avoid assertion violation in callproc.c
dcc00bbb19 ; * CONTRIBUTE: Clarify the "15-lines" rule a bit more.
Glenn Morris [Fri, 19 Feb 2021 16:36:56 +0000 (08:36 -0800)]
; Merge from origin/emacs-27
The following commit was skipped:
120149cf6a Clarify "changes" in CONTRIBUTE
Glenn Morris [Fri, 19 Feb 2021 16:36:55 +0000 (08:36 -0800)]
Merge from origin/emacs-27
4712c75ab8 Clarify when activate-mark-hook is run
abedf3a865 Fix language-environment and font selection on MS-Windows
8b8708eadd Fix example in Sequence Functions node in the manual
Ulf Jasper [Fri, 19 Feb 2021 16:07:36 +0000 (17:07 +0100)]
Enable newsticker--group-shift-feed-(up|down) to move groups as well
Fix broken newsticker--group-shift-group-(up-down).
* lisp/net/newst-treeview.el (newsticker-treeview-jump): Change prompt
string.
(newsticker--group-shift): Move the group when a group is currently
selected. Fix error when explicitly shifting a group. (Fixes first
issue in Bug#41376.)
Eli Zaretskii [Fri, 19 Feb 2021 13:16:31 +0000 (15:16 +0200)]
More accurate documentation of the "r" interactive spec
* doc/lispref/commands.texi (Interactive Codes): Describe the
effect of 'mark-even-if-inactive'.
Mattias Engdegård [Fri, 19 Feb 2021 12:44:25 +0000 (13:44 +0100)]
Fix regexp mistakes
* lisp/progmodes/cperl-mode.el (cperl--package-regexp):
Avoid double repetition; cperl--ws-or-comment-regexp is already
repeated with 1+.
* test/lisp/textmodes/dns-mode-tests.el
(dns-mode-tests-dns-mode-soa-increment-serial): Escape literal '$'.
* test/lisp/emacs-lisp/rx-tests.el (rx-regexp): Modify test to not
trigger a linting warning while retaining its testing power.
Stefan Kangas [Fri, 19 Feb 2021 09:21:14 +0000 (10:21 +0100)]
Mention the GNU Kind Communications Guidelines in the FAQ
* doc/misc/efaq.texi (Guidelines for newsgroup postings): Mention
the GNU Kind Communications Guidelines.
Michael Albinus [Fri, 19 Feb 2021 09:03:32 +0000 (10:03 +0100)]
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs
Michael Albinus [Fri, 19 Feb 2021 09:03:20 +0000 (10:03 +0100)]
; Fix indentation in test/README
Stefan Kangas [Fri, 19 Feb 2021 07:38:29 +0000 (08:38 +0100)]
* lisp/calculator.el: Minor doc fix. Remove redundant :group args.
Stefan Kangas [Fri, 19 Feb 2021 07:30:04 +0000 (08:30 +0100)]
; * lisp/plstore.el: Fix formatting.
Michael Albinus [Fri, 19 Feb 2021 08:21:55 +0000 (09:21 +0100)]
Fix Tramp bug#46625
* test/lisp/net/tramp-tests.el (tramp-test33-environment-variables):
Adapt test. (Bug#46625)
Stefan Kangas [Fri, 19 Feb 2021 05:51:49 +0000 (06:51 +0100)]
Do interactive mode tagging for snake.el
Stefan Kangas [Fri, 19 Feb 2021 05:32:04 +0000 (06:32 +0100)]
Do interactive mode tagging for tetris.el
Stefan Kangas [Fri, 19 Feb 2021 05:29:00 +0000 (06:29 +0100)]
Do interactive mode tagging for man.el
Stefan Kangas [Fri, 19 Feb 2021 01:27:56 +0000 (02:27 +0100)]
Do interactive mode tagging for package.el
Thomas Fitzsimmons [Thu, 18 Feb 2021 23:05:38 +0000 (18:05 -0500)]
Implement NTLM server for ntlm.el testing
* test/Makefile.in
(GNU_ELPA_DIRECTORY, elpa_dependencies, elpa_els, elpa_opts): New
variables.
(EMACSOPT, ert_opts): Add elpa_opts.
* test/README: Document GNU_ELPA_DIRECTORY make variable.
* test/lisp/net/ntlm-tests.el: Fix checkdoc-reported issues.
(ntlm-tests-message, ntlm-server-build-type-2, ntlm-server-hash)
(ntlm-server-check-authorization, ntlm-server-do-token)
(ntlm-server-filter, ntlm-server-handler, ntlm-server-start)
(ntlm-server-stop, ntlm-tests--url-retrieve-internal-around)
(ntlm-tests--authenticate)
(ntlm-tests--start-server-authenticate-stop-server): New
functions.
(ntlm-tests--username-oem, ntlm-tests--username-unicode)
(ntlm-tests--client-supports-unicode, ntlm-tests--challenge)
(ntlm-tests--result-buffer, ntlm-tests--successful-result): New
variables.
(ntlm-authentication)
(ntlm-authentication-old-compatibility-level): New tests.
* test/lisp/net/ntlm-resources/authinfo: New file. (Bug#43566)
Stefan Monnier [Thu, 18 Feb 2021 16:15:13 +0000 (11:15 -0500)]
* lisp/emacs-lisp/bindat.el: Tweak example in comment
Suggested by Kim Storm <storm@cua.dk>.
Mattias Engdegård [Thu, 18 Feb 2021 15:41:36 +0000 (16:41 +0100)]
Fix typos
* doc/lispref/display.texi (Size of Displayed Text):
* doc/lispref/windows.texi (Buffer Display Action Functions):
* etc/NEWS:
* etc/ORG-NEWS (Org-Attach has been refactored and extended):
* lisp/battery.el (display-battery-mode, battery--upower-subsribe):
* lisp/calendar/parse-time.el:
* lisp/dired-x.el:
* lisp/emacs-lisp/chart.el (chart-sequece, chart-bar-quickie):
* lisp/emacs-lisp/eldoc.el (eldoc-echo-area-use-multiline-p)
(eldoc-documentation-strategy):
* lisp/emacs-lisp/pcase.el (pcase--split-pred, pcase--u1):
* lisp/gnus/gnus-search.el (gnus-search-expandable-keys)
(gnus-search-parse-query, gnus-search-query-return-string)
(gnus-search-imap, gnus-search-imap-search-command)
(gnus-search-transform-expression):
* lisp/gnus/nnselect.el:
* lisp/isearch.el (isearch-lazy-count-format):
* lisp/mh-e/mh-show.el (mh-show-msg):
* lisp/net/dictionary-connection.el (dictionary-connection-open):
* lisp/net/dictionary.el (dictionary-default-popup-strategy)
(dictionary, dictionary-split-string, dictionary-do-select-dictionary)
(dictionary-display-dictionarys, dictionary-search)
(dictionary-tooltip-mode):
* lisp/net/eudcb-macos-contacts.el (eudc-macos-contacts-set-server):
* lisp/net/mailcap.el (mailcap-mime-data):
* lisp/net/tramp-smb.el (tramp-smb-maybe-open-connection):
* lisp/nxml/nxml-mode.el (nxml-mode):
* lisp/progmodes/cc-engine.el:
* lisp/progmodes/cperl-mode.el (cperl-mode)
(cperl-fontify-syntaxically):
* lisp/progmodes/flymake.el (flymake-diagnostic-functions):
* lisp/progmodes/verilog-mode.el (verilog--supressed-warnings)
(verilog-preprocess):
* lisp/simple.el (self-insert-uses-region-functions):
* lisp/textmodes/bibtex.el (bibtex-copy-summary-as-kill):
* lisp/textmodes/texnfo-upd.el (texinfo-insert-master-menu-list):
* src/dispnew.c:
* src/font.c (Ffont_get):
* src/indent.c (compute_motion):
* src/process.c (init_process_emacs):
* src/w32fns.c (deliver_wm_chars):
* test/lisp/jsonrpc-tests.el (deferred-action-complex-tests):
Fix typos in documentation, comments, and internal identifiers.
Stefan Monnier [Thu, 18 Feb 2021 15:27:36 +0000 (10:27 -0500)]
* lisp/emacs-lisp/edebug.el (eval-defun): Simplify
(edebug-all-defs, edebug-all-forms): Don't autoload since the problem
it was working around has been fixed a while back.
(edebug--eval-defun): Rename from `edebug-eval-defun` and simplify by
making it an `:around` advice.
(edebug-install-read-eval-functions)
(edebug-uninstall-read-eval-functions): Adjust accordingly.
(edebug-eval-defun): Redefine as an obsolete wrapper.
* lisp/progmodes/elisp-mode.el (elisp--eval-defun):
Use `load-read-function` so it obeys `edebug-all-(defs|forms)`.
(elisp--eval-defun): Fix recent regression introduced with
`elisp--eval-defun-result`.
Eli Zaretskii [Thu, 18 Feb 2021 14:07:34 +0000 (16:07 +0200)]
; * CONTRIBUTE: Another wording change regarding tiny changes.
Lars Ingebrigtsen [Thu, 18 Feb 2021 11:52:55 +0000 (12:52 +0100)]
Revert "Do interactive mode tagging for python.el navigation functions."
This reverts commit
546f552e7b2439b482c7d28222fb88761a9c876a.
This is a "core package", so can't use the new syntax.
Ryan Prior [Thu, 18 Feb 2021 11:48:28 +0000 (12:48 +0100)]
Allow newlines in password prompts again in comint
* lisp/comint.el (comint-password-prompt-regexp): Match all
whitespace (including newline) at the end of the passphrase, not
just space and \t (bug#46609).
(comint-watch-for-password-prompt): Remove trailing newlines from
the prompt (bug#46609).
Copyright-paperwork-exempt: yes
Doug Davis [Thu, 18 Feb 2021 11:39:00 +0000 (12:39 +0100)]
Do interactive mode tagging for python.el navigation functions.
* lisp/progmodes/python.el (navigation functions): Add python-mode to
`interactive' declarations for mode-specific commands (bug#46610).
Copyright-paperwork-exempt: yes
Mattias Engdegård [Thu, 18 Feb 2021 10:11:11 +0000 (11:11 +0100)]
Fix rx `regexp` form with deprecated syntax
The argument of the rx `regexp` form is assumed to evaluate to a valid
regexp, but certain kinds of deprecated but still accepted usage were
not handled correctly, such as unescaped literal (special) characters:
(rx "a" (regexp "*")) => "a*" which is wrong.
Handle these cases; there is no extra trouble.
* lisp/emacs-lisp/rx.el (rx--translate-regexp): Force bracketing
of single special characters.
* test/lisp/emacs-lisp/rx-tests.el (rx-regexp): Add test case.
Dmitry Gutov [Thu, 18 Feb 2021 03:06:33 +0000 (05:06 +0200)]
Move 'project-try-ede' to the back of 'project-find-functions'
* lisp/cedet/ede.el (project-find-functions):
Move 'project-try-ede' further back, so that 'project-try-vc' has
priority (bug46202).
Dmitry Gutov [Wed, 17 Feb 2021 23:41:03 +0000 (01:41 +0200)]
Present C source files as absolute file names too when possible
* lisp/progmodes/elisp-mode.el (xref-location-group):
Present C source files as absolute file names too when possible
(bug#46514).
Basil L. Contovounesios [Wed, 17 Feb 2021 23:08:24 +0000 (23:08 +0000)]
; Fix another recent typo in simple.el.
Basil L. Contovounesios [Wed, 17 Feb 2021 22:49:15 +0000 (22:49 +0000)]
Fix recent Command Modes changes in Elisp manual
* doc/lispref/commands.texi (Command Modes): Fix typos and grammar.
Cross-reference the 'declare' form node.
Basil L. Contovounesios [Wed, 17 Feb 2021 22:48:18 +0000 (22:48 +0000)]
; Fix typo in last change to simple.el.
Matt Armstrong [Wed, 17 Feb 2021 22:33:21 +0000 (23:33 +0100)]
doc/lispref/commands.texi (Command Modes): Fix typo.
* doc/lispref/commands.texi (Command Modes): Fix typo.
Alan Mackenzie [Wed, 17 Feb 2021 21:15:51 +0000 (21:15 +0000)]
Make goto-line-history buffer local only when so customized
* lisp/simple.el (goto-line-history-local): New customizable option.
(goto-line-history): Define this simply with defvar, not defvar-local.
(goto-line-read-args): Handle goto-line-history-local, and changes to it.
* doc/emacs/basic.texi (Moving Point): Add a paragraph about
goto-line-history-local.
* etc/NEWS: Add an item under "Editing Changes in Emacs 28.1".
Lars Ingebrigtsen [Wed, 17 Feb 2021 19:59:44 +0000 (20:59 +0100)]
Adjust the edebug spec for `interactive'
* lisp/emacs-lisp/edebug.el: Adjust the edebug spec for
`interactive' for the new syntax.
Lars Ingebrigtsen [Wed, 17 Feb 2021 19:14:22 +0000 (20:14 +0100)]
Make unused `Buffer-menu-sort' alias obsolete
* lisp/buff-menu.el (Buffer-menu-sort): Make unused alias obsolete.
* test/lisp/progmodes/elisp-mode-tests.el
(find-defs-defalias-defun-el): Adjust test to use an alias that's
not obsolete.
Lars Ingebrigtsen [Wed, 17 Feb 2021 18:54:09 +0000 (19:54 +0100)]
Mark up commands in buff-menu.el for modes
Glenn Morris [Wed, 17 Feb 2021 19:08:27 +0000 (11:08 -0800)]
; * admin/CPP-DEFINES: Remove unused defines.
Lars Ingebrigtsen [Wed, 17 Feb 2021 18:25:08 +0000 (19:25 +0100)]
Explicate on how to tag commands with modes
* doc/lispref/commands.texi (Command Modes): New node.
(Using Interactive): Move the `modes' text to the new node.
Juri Linkov [Wed, 17 Feb 2021 18:04:42 +0000 (20:04 +0200)]
New transient mode 'repeat-mode' to allow shorter key sequences (bug#46515)
* doc/emacs/basic.texi (Repeating): Document repeat-mode.
* lisp/repeat.el (repeat-exit-key): New defcustom.
(repeat-mode): New global minor mode.
(repeat-post-hook): New function.
* lisp/bindings.el (undo-repeat-map): New variable.
(undo): Put 'repeat-map' property with
'undo-repeat-map'.
(next-error-repeat-map): New variable.
(next-error, previous-error): Put 'repeat-map' property with
'next-error-repeat-map'.
* lisp/window.el (other-window-repeat-map): New variable.
(other-window): Put 'repeat-map' property with
'other-window-repeat-map'.
(resize-window-repeat-map): New variable.
(enlarge-window, enlarge-window-horizontally)
(shrink-window-horizontally, shrink-window): Put 'repeat-map'
property with 'resize-window-repeat-map'.
Juri Linkov [Wed, 17 Feb 2021 17:56:45 +0000 (19:56 +0200)]
New command 'tab-duplicate' like in web browsers
Michael Albinus [Wed, 17 Feb 2021 17:04:35 +0000 (18:04 +0100)]
Further Tramp code cleanup
* doc/misc/tramp.texi (Predefined connection information):
Mention "about-args".
* lisp/net/tramp-cmds.el (tramp-version): Adapt docstring.
* lisp/net/tramp.el (tramp-handle-expand-file-name):
* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-expand-file-name):
* lisp/net/tramp-sh.el (tramp-sh-handle-expand-file-name)
* lisp/net/tramp-smb.el (tramp-smb-handle-expand-file-name):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-expand-file-name):
Handle local "/..".
* lisp/net/tramp-rclone.el (tramp-methods) <rclone>:
Adapt `tramp-mount-args'.
(tramp-rclone-flush-directory-cache): Remove.
(tramp-rclone-do-copy-or-rename-file)
(tramp-rclone-handle-delete-directory)
(tramp-rclone-handle-delete-file)
(tramp-rclone-handle-make-directory): Don't use that function.
(tramp-rclone-maybe-open-connection): Fix use of `tramp-mount-args'.
* lisp/net/trampver.el (tramp-inside-emacs): New defun.
* lisp/net/tramp.el (tramp-handle-make-process):
* lisp/net/tramp-sh.el (tramp-sh-handle-make-process)
(tramp-sh-handle-process-file, tramp-open-shell): Use it.
(tramp-get-env-with-u-option): Remove.
* test/lisp/net/tramp-tests.el (tramp-test05-expand-file-name-top):
New test.
Eli Zaretskii [Wed, 17 Feb 2021 16:59:01 +0000 (18:59 +0200)]
; Fix last m-x.texi change.
Eli Zaretskii [Wed, 17 Feb 2021 16:57:42 +0000 (18:57 +0200)]
; Fix last change in commands.texi.
Eli Zaretskii [Wed, 17 Feb 2021 16:53:54 +0000 (18:53 +0200)]
Disable filtering of commands in M-x completion
This makes the default behavior like it was before:
M-x completion doesn't filter out any commands. To
have commands filtered based on their relevance to the
current buffer's modes, customize the option
'read-extended-command-predicate' to call
'command-completion-default-include-p'.
* doc/lispref/commands.texi (Interactive Call):
* doc/emacs/m-x.texi (M-x): Update the description of
'read-extended-command-predicate' and improve wording.
* etc/NEWS: Update the entry about
'read-extended-command-predicate'.
* lisp/simple.el (read-extended-command-predicate): Change default
value to nil. Update doc string. Add :group.
(read-extended-command): Handle nil as meaning to apply
no-filtering.
Lars Ingebrigtsen [Wed, 17 Feb 2021 16:12:27 +0000 (17:12 +0100)]
Fix recently introduced bug in `byte-compile-lambda'
* lisp/emacs-lisp/bytecomp.el (byte-compile-lambda): Fix recently
introduced error when compiling non-lexical commands (bug#46589).
Basil L. Contovounesios [Wed, 17 Feb 2021 13:27:56 +0000 (13:27 +0000)]
; Finish recent rename of completion-* predicates.
Lars Ingebrigtsen [Wed, 17 Feb 2021 11:15:07 +0000 (12:15 +0100)]
Clarify 'read-extended-command-predicate' in NEWS
Lars Ingebrigtsen [Wed, 17 Feb 2021 11:01:27 +0000 (12:01 +0100)]
Change name for the completion-* predicates
* lisp/simple.el (command-completion-default-include-p)
(command-completion-with-modes-p, command-completion-button-p):
Rename from completion-*.
(read-extended-command-predicate): Adjust default predicate.
* lisp/emacs-lisp/byte-run.el (byte-run--set-modes): Adjust
predicate name.
Glenn Morris [Wed, 17 Feb 2021 05:25:18 +0000 (21:25 -0800)]
* configure.ac: Replace obsolete AC_CHECK_HEADER usage. (Bug#46578)
Glenn Morris [Wed, 17 Feb 2021 04:54:46 +0000 (20:54 -0800)]
* configure.ac: Replace obsolete AC_TRY_LINK with AC_LINK_IFELSE.
Glenn Morris [Wed, 17 Feb 2021 04:34:26 +0000 (20:34 -0800)]
Remove TIME_WITH_SYS_TIME, unused for a long time
* configure.ac (AC_HEADER_TIME): Remove. (Bug#46578)
Harald Jörg [Tue, 16 Feb 2021 23:54:38 +0000 (00:54 +0100)]
cperl-mode: Improve detection of index entries for imenu
* lisp/progmodes/cperl-mode.el
(cperl-imenu-addback): Customization variable deleted. This
variable has been declared obsolete in 1998.
(cperl--basic-identifier-regexp) and many other variables:
defining regular expressions for basic Perl constructs.
(cperl-imenu--create-perl-index): This function has been
completely rewritten, keeping only some parts of the output
formatting. It now recognizes a lot more package and
subroutine declarations which came since Perl 5.14: Packages
with a version and/or a block attached, lexical subroutines,
declarations with a newline between the keyword "package" and
the package name, and several more. This version also
correctly separates subroutine names from attributes, does no
longer support "unnamed" packages (which don't exist in Perl),
and doesn't fall for false positives like stuff that looks
like a declaration in a multiline string.
(cperl-tags-hier-init): Eliminate call to
`cperl-imenu-addback` (which actually was commented out in
1997)
* test/lisp/progmodes/cperl-mode-tests.el
(cperl-test--validate-regexp) and six other new tests for the
new regular expressions and the index creation.
* test/lisp/progmodes/cperl-mode-resources/grammar.pl: New
file showcasing different syntax variations for package and
sub declarations (bug#46574).
Lars Ingebrigtsen [Tue, 16 Feb 2021 23:43:52 +0000 (00:43 +0100)]
Don't move point in `exif-parse-buffer'
* lisp/image/exif.el (exif-parse-buffer): Don't move point
(bug#46552).
Lars Ingebrigtsen [Tue, 16 Feb 2021 22:32:04 +0000 (23:32 +0100)]
Fix edebug spec for minibuffer-with-setup-hook
* lisp/files.el (minibuffer-with-setup-hook): Instrument the
:append form for edebug (bug#46531).
Lars Ingebrigtsen [Tue, 16 Feb 2021 22:06:46 +0000 (23:06 +0100)]
Clarify Gnus Agent expiry quirks
* doc/misc/gnus.texi (Agent Expiry): Mention that the last article
won't be expired (bug#46533).
Glenn Morris [Tue, 16 Feb 2021 20:11:55 +0000 (12:11 -0800)]
thumbs.el: avoid creating thumbs directory on loading library
* lisp/thumbs.el (thumbs-cleanup-thumbsdir):
Don't create the thumbs directory if it does not exist.
Glenn Morris [Tue, 16 Feb 2021 20:03:39 +0000 (12:03 -0800)]
* admin/cus-test.el (cus-test-load-libs): Quieten loading.
Glenn Morris [Tue, 16 Feb 2021 20:01:25 +0000 (12:01 -0800)]
* admin/cus-test.el (cus-test-get-lisp-files): Ignore loaddefs files.
Bastian Beranek [Tue, 16 Feb 2021 10:35:35 +0000 (11:35 +0100)]
* lisp/tab-bar.el: Fix behavior of toggle-frame-tab-bar (bug #46299)
(toggle-frame-tab-bar): Add frame parameter to protect tab bar state.
(tab-bar--update-tab-bar-lines): Check parameter.
Basil L. Contovounesios [Sun, 14 Feb 2021 16:58:06 +0000 (16:58 +0000)]
Pacify unused function warning in xfns.c with GTK2
* src/xfns.c (x_get_net_workarea, x_get_monitor_for_frame)
(x_make_monitor_attribute_list, x_get_monitor_attributes_fallback):
[HAVE_XINERAMA] (x_get_monitor_attributes_xinerama)
[HAVE_XRANDR] (x_get_monitor_attributes_xrandr)
(x_get_monitor_attributes): Fix #ifdefs around definitions to avoid
unused function warnings regardless of GTK use (bug#46509).
[HAVE_XRANDR] (x_get_monitor_attributes_xrandr): Undefine
RANDR13_LIBRARY after it's been used.
Lars Ingebrigtsen [Tue, 16 Feb 2021 16:42:24 +0000 (17:42 +0100)]
Revert "Fix problem of point movement in image-mode"
This reverts commit
7c7377288a125ef47f2b422cf131f044a3b418e1.
This is fixed differently in Emacs 27.
Lars Ingebrigtsen [Tue, 16 Feb 2021 16:39:03 +0000 (17:39 +0100)]
Fix problem of point movement in image-mode
* lisp/image-mode.el (image-mode): Switch disable-point-adjustment
on, otherwise `C-c C-c' will move point around oddly.
(image-toggle-display): Ensure that point is on the image (bug#46552).
Eli Zaretskii [Tue, 16 Feb 2021 16:20:06 +0000 (18:20 +0200)]
Avoid point movement when visiting image files
* lisp/image-mode.el (image-toggle-display-image): Preserve point
around the call to exif-parse-buffer, to prevent it from moving
into the image data. (Bug#46552)
Lars Ingebrigtsen [Tue, 16 Feb 2021 13:21:52 +0000 (14:21 +0100)]
Do interactive mode tagging for info.el
Lars Ingebrigtsen [Tue, 16 Feb 2021 13:00:55 +0000 (14:00 +0100)]
Don't resize images in image-mode if we have a rotation
* lisp/image-mode.el (image-fit-to-window): Don't resize of we
have a manually rotated imaged (and explain the resizing logic a
bit).
Konstantin Kharlamov [Tue, 16 Feb 2021 11:49:30 +0000 (12:49 +0100)]
make smerge-vc-next-conflict wrap around
* lisp/vc/smerge-mode.el:
(smerge-vc-next-conflict): While searching for conflict markers,
wrap search around if current file is the last one with conflicts
(bug#46538).
Stefan Kangas [Tue, 16 Feb 2021 09:05:03 +0000 (10:05 +0100)]
Do `interactive' mode tagging in gomoku.el
* lisp/play/gomoku.el: Do `interactive' mode tagging.
Stefan Kangas [Tue, 16 Feb 2021 08:56:17 +0000 (09:56 +0100)]
* lisp/play/gomoku.el: Minor doc fixes; formatting.
Stefan Monnier [Tue, 16 Feb 2021 04:54:45 +0000 (23:54 -0500)]
* lisp/emacs-lisp/bindat.el: Add 64bit int support
(bindat--unpack-u64, bindat--unpack-u64r, bindat--pack-u64)
(bindat--pack-u64r): New functions.
(bindat--unpack-item, bindat--pack-item): Use them.
(bindat--fixed-length-alist): Add new types.
Stefan Kangas [Tue, 16 Feb 2021 04:26:24 +0000 (05:26 +0100)]
Fix admin/check-doc-strings for new DEFUN format
* admin/check-doc-strings: Various fixes, including for the new DEFUN
format. The script still produces a ton of false positives, however.
Stefan Monnier [Tue, 16 Feb 2021 04:22:09 +0000 (23:22 -0500)]
* lisp/emacs-lisp/bindat.el: Clarify when field labels are optional
The fixes the doc and the Edebug spec, as well as a subtle issue in
the code where a field whose name is (eval 'fill) was mistakenly
considered as an anonymous field of type `fill`.
(bindat--unpack-item, bindat--unpack-group, bindat--length-group)
(bindat--pack-item, bindat--pack-group): Use dotimes, dolist, and pcase.
(bindat--item-aux): New edebug elem.
(bindat-item): Use it to fix the handling of optional fields.
(bindat-format-vector): Use `mapconcat`.
Stefan Monnier [Tue, 16 Feb 2021 02:25:15 +0000 (21:25 -0500)]
* lisp/emacs-lisp/bindat.el (bindat-spec): New macro.
It's basically an alias for `quote`, but it offers the advantage of
providing Edebug support and opens the possibility of compiling
the bindat spec to ELisp code.
* doc/lispref/processes.texi (Bindat Spec): Document `bindat-spec`.
(Bindat Functions): Tweak a few things to adjust to the state of the code.
* test/lisp/emacs-lisp/bindat-tests.el: Use it.
* test/lisp/emacs-lisp/edebug-tests.el (edebug-tests--read): New function.
(edebug-tests--&rest-behavior): New test.
Basil L. Contovounesios [Mon, 15 Feb 2021 21:50:38 +0000 (21:50 +0000)]
; Fix last change in simple.el.
Stefan Monnier [Mon, 15 Feb 2021 17:07:52 +0000 (12:07 -0500)]
* lisp/emacs-lisp/macroexp.el (macroexp--expand-all): Warn on empty let bodies
Ulf Jasper [Mon, 15 Feb 2021 16:27:45 +0000 (17:27 +0100)]
Display yearly ical events from first year on. Fix Bug#23100.
Convert yearly rrule starting in year x into diary-anniversary entry
for year x-1 when importing an icalendar. Correspondingly convert
diary-anniversary for year x into yearly rrule starting in year x+1.
*
test/lisp/calendar/icalendar-resources/import-rrule-anniversary.diary-american:
*
test/lisp/calendar/icalendar-resources/import-rrule-anniversary.diary-european:
*
test/lisp/calendar/icalendar-resources/import-rrule-anniversary.diary-iso:
*
test/lisp/calendar/icalendar-resources/import-rrule-yearly.diary-american:
*
test/lisp/calendar/icalendar-resources/import-rrule-yearly.diary-european:
*
test/lisp/calendar/icalendar-resources/import-rrule-yearly.diary-iso:
*
test/lisp/calendar/icalendar-tests.el (icalendar-convert-anniversary-to-ical):
Match new diary-anniversary/yearly-rrule behaviour.
* lisp/calendar/icalendar.el (icalendar--datestring-to-isodate): Add
year-shift option. (icalendar--convert-anniversary-to-ical): Shift
the year as diary-anniversary is not displayed in the initial year.
(icalendar--convert-recurring-to-diary): Shift the year as
diary-anniversary is not displayed in the initial year. (Bug#23100)
Stefan Monnier [Mon, 15 Feb 2021 15:57:26 +0000 (10:57 -0500)]
* lisp/calc/calc-sel.el (calc-replace-sub-formula): Fix typo
Reported by Sébastien Miquel <sebastien.miquel@posteo.eu>
Stefan Monnier [Mon, 15 Feb 2021 15:50:07 +0000 (10:50 -0500)]
* lisp/emacs-lisp/bindat.el: Expose the `struct` variable (bug#46534)
(bindat--unpack-group, bindat--length-group, bindat--pack-group):
Mark it as dynamically scoped.
Lars Ingebrigtsen [Mon, 15 Feb 2021 13:43:53 +0000 (14:43 +0100)]
Allow overriding declared predicates, too
* lisp/simple.el (completion-default-include-p): Rename and move
the checking for an explicit predicate down here...
(read-extended-command): ... from here.
(read-extended-command-predicate): Adjust default value.
Lars Ingebrigtsen [Mon, 15 Feb 2021 12:43:27 +0000 (13:43 +0100)]
Do `interactive' mode tagging in the remaining lisp/gnus files
Lars Ingebrigtsen [Mon, 15 Feb 2021 12:08:15 +0000 (13:08 +0100)]
Add a new variable `global-minor-modes'
* doc/lispref/modes.texi (Minor Modes): Document it.
* lisp/simple.el (global-minor-modes): New variable.
(completion-in-mode-p): Use it.
(completion-with-modes-p): Use it.
* lisp/emacs-lisp/easy-mmode.el (define-minor-mode): Support it.
Lars Ingebrigtsen [Mon, 15 Feb 2021 11:44:57 +0000 (12:44 +0100)]
Rename minor-modes to local-minor-modes
* doc/lispref/modes.texi (Minor Modes): Update documentation.
* lisp/simple.el (completion-with-modes-p): Change usage.
* lisp/emacs-lisp/easy-mmode.el (define-minor-mode): Change usage.
* src/buffer.c: Rename from minor_modes to local_minor_modes
throughout.
(syms_of_buffer): Rename minor-modes to local-minor-modes.
* src/buffer.h (struct buffer): Rename minor_modes_.
* src/pdumper.c (dump_buffer): Update hash and usage.
Stefan Monnier [Mon, 15 Feb 2021 04:56:42 +0000 (23:56 -0500)]
* lisp/emacs-lisp/edebug.el (edebug-&optional, edebug-&rest): Remove vars
According to my tests, `edebug-&optional` never has any effect.
And `edebug-&rest` can be replaced with a closure.
(edebug-&rest-wrapper): Remove function.
(edebug--match-&-spec-op): Use a closure to remember the `specs`.
Stefan Monnier [Mon, 15 Feb 2021 03:56:08 +0000 (22:56 -0500)]
* lisp/emacs-lisp/byte-run.el (compiler-macro): Make it Edebuggable
* lisp/emacs-lisp/gv.el (gc-expander, gv-setter): Reuse the spec of
`compiler-macro`.
Lars Ingebrigtsen [Mon, 15 Feb 2021 03:42:32 +0000 (04:42 +0100)]
Make the button completion predicate be more useful
* lisp/simple.el (completion-button-p): Rework from
`completion-at-point-p'.
* lisp/net/shr.el (shr-show-alt-text): It should be possible to
complete to commands that aren't bound to a key.